package com.itheima.demoString;

import java.util.Scanner;

public class Demo05String {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串:");
        int bigCount = 0;
        int smallCount = 0;
        int numCount = 0;
        String str = sc.next();
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) >= 97 && str.charAt(i) <= (97 + 26)) {
                bigCount++;
            }else if(str.charAt(i) >= 65 && str.charAt(i) <= (65 + 26)){
                smallCount++;
            }else if(str.charAt(i) >= '0' && str.charAt(i) <= '9'){
                numCount++;
            }
        }
        System.out.println("大写字母个数为:" + bigCount + "\t小写字母个数为:" + smallCount + "\t数字个数为:" + numCount);
    }
}
